<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>请选择网站</title>
<link href="/css/admin.css" rel="stylesheet" type="text/css" />
<script src="/js/jquery-1.5.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
	$(function () {
		$('.commonTable tr').hover(function () {
			$(this).css('background-color', '#ffffae');
		},
        function () {
        	$(this).css('background-color', '#FFFFFF');
        });
       });
	function doSel()
	{
		var item = $("input[name='sid']:checked").val();
		if(item == '' || typeof(item) == 'undefined')
		{
			alert('请选择一个网站!');
			return;
		}
	    window.opener.setSite(item);
	    window.close();
	}
</script>
</head>
<body>
	<div><table class="commonTable" width="100%" cellspacing="0" cellpadding="5" >
	    <tr>
	    	<th  >
		    </th>
		    <th>名称</th>		    
	    </tr>
		<?php foreach ($query->result() as $row){
			if($curuserid != 'admin' && !in_array($row->sid, $filter))
				continue;
			?>
			<tr>
			<td><input type="radio" id="radio_<?=$row->sid?>" name="sid" value="<?=$row->sid.'|'.$row->sname?>" ></td>
			<td><?=$row->sname?></td>
			</tr>
		<?php } ?>
	</table></div>
	<div style="text-align:center;"><input type="button" value=" 确定 " onclick="doSel()" />&nbsp;&nbsp;<input type="button" value="取消" onclick="self.close();"/></div>
</body>
</html>